package cn.sumpu.app.guoguojie.biz;

import java.util.List;
import java.util.Map;

import cn.sumpu.app.guoguojie.domain.Doing;
import cn.sumpu.app.guoguojie.domain.DoingPictorial;
import cn.sumpu.app.guoguojie.domain.DoingPictorialVisit;
import cn.sumpu.app.guoguojie.domain.Member;
import cn.sumpu.app.guoguojie.exception.AppBusinessException;
import cn.sumpu.app.guoguojie.util.PageModel;

public interface PictorialBiz {

    public DoingPictorial savePictorial(DoingPictorial dp) throws AppBusinessException;

    public DoingPictorial updatePictorial(DoingPictorial dp) throws AppBusinessException;

    public void updatePicView(String pictorialId) throws AppBusinessException;

    public PageModel getPictorialList(String family, Integer page) throws AppBusinessException;

    public DoingPictorial getPictorialById(String identifier) throws AppBusinessException;

    public PageModel getPictorialList6(String family, Integer page) throws AppBusinessException;

    public PageModel getMorePictorialList2(String family, String pictorial) throws AppBusinessException;

    public String joinPictorial(Member member, Doing doing, String pictorial, String picproId, int picType) throws AppBusinessException;

    public int getExistPicpro(Integer picType, String picproId, String pictorial) throws AppBusinessException;

    public PageModel getPicDoingList(String family, String pictorial, Integer page) throws AppBusinessException;

    public void deletePictorial(String family, String pictorial) throws AppBusinessException;

    public int getPicorialCount(String family) throws AppBusinessException;

    public List<DoingPictorialVisit> selectPictorialVisitList(String picorialId) throws AppBusinessException;

    public void insterPictorialVisit(DoingPictorialVisit doingPictorialVisit) throws AppBusinessException;

    // 查询推荐的画报
    List<DoingPictorial> getPictorialByChannel(String channel, Integer number) throws AppBusinessException;

    /**
     * author BruceZhang
     * 
     * @param channel
     *            频道ID
     * @param status
     *            状态
     * @param type
     *            分类
     * @param page
     *            页码
     * @return 查询最热的画报
     * @throws AppBusinessException
     */
    PageModel getHotPictorialByCategory(String channel, String status, String type, Integer page, String topic) throws AppBusinessException;

    // 查询推荐的画报的总记录数
    Integer getPictorialCountByChannel(String channel, String status, String type, String topic) throws AppBusinessException;

    // 查询每个分类推荐的第一个
    List<DoingPictorial> getHotPictorialNo1(String channel, String status) throws AppBusinessException;

    // 查询最新的画报
    PageModel getPictorialNew(String type, Integer page, String topic) throws AppBusinessException;

    public PageModel getPictorialNew(String type, Integer page, String topic, int pageSize, Map<String, Object> map) throws AppBusinessException;

    // 查询最新的画报的总记录数
    Integer getPictorialCountNew(String type, String topic) throws AppBusinessException;

    // 画报主页的分页
    PageModel getHotPictorialIndex(String channel, String status, Integer page) throws AppBusinessException;

    PageModel getPictorialNewIndex(Integer page) throws AppBusinessException;

    // 查询前N条画报记录
    List<DoingPictorial> getPictorialBruce(int size) throws AppBusinessException;

    /**
     * author BruceZhang
     * @param page	第几页
     * @param times	第几次
     * @param topic 主题ID
     * @return	查询主题下面的画报
     * @throws AppBusinessException
     */
    PageModel getTopicDetail(Integer page, Integer times, String topic) throws AppBusinessException;

    

}
